/*
 * @FilePath: /tads/server/app/business/models/icon.go
 * @Author: wnina0x0
 * @Date: 2025-04-18 09:19:03
 * @Description:
 *
 * 版权信息 : 2025 by wnina0x0, All Rights Reserved.
 */
package models

import (
	"time"

	"gorm.io/gorm"
)

type Icon struct {
	ID               uint           `gorm:"primaryKey;autoIncrement;column:id;comment:主键ID" json:"id"`
	IconName         string         `gorm:"size:100;not null;column:icon_name;comment:组件名称" json:"icon_name"`
	IconPath         string         `gorm:"size:100;not null;column:icon_path;comment:组件图片地址" json:"icon_path"`
	IconAttackPath   string         `gorm:"size:100;not null;column:icon_attack_path;comment:组件图片地址" json:"icon_attack_path"`
	IconBusType      string         `gorm:"not null;type:text;column:icon_bus_type;comment:组件总线类型" json:"icon_bus_type"`
	IconAttackMethod string         `gorm:"not null;type:text;column:icon_attack_method;comment:组件攻击技术" json:"icon_attack_method"`
	IsDeleted        bool           `gorm:"default:false;column:is_deleted;index;comment:是否删除" json:"is_deleted"`
	Creator          string         `gorm:"size:50;not null;column:creator;comment:创建者" json:"creator"`
	CreateTime       time.Time      `gorm:"type:timestamp;default:now();not null;column:create_time;comment:创建时间" json:"create_time"`
	Updater          string         `gorm:"size:50;not null;column:updater;comment:更新者" json:"updater"`
	UpdateTime       time.Time      `gorm:"type:timestamp;default:now();not null;column:update_time;comment:更新时间" json:"update_time"`
	DeletedTime      gorm.DeletedAt `gorm:"index" json:"-"`
}

func (Icon) TableName() string {
	return "t_icon"
}
